package com.yalu.dao.data.impl;

import java.util.List;


import org.springframework.stereotype.Repository;

import com.yalu.dao.base.impl.BaseDaoImpl;
import com.yalu.dao.data.SalesDao;
import com.yalu.entity.data.Sales;
import com.yalu.entity.data.SalesKey;

@Repository
public class SalesDaoImpl extends BaseDaoImpl<Sales, SalesKey> implements SalesDao {
	@SuppressWarnings("unchecked")
	@Override
	public List<Sales> getDataListByTime(String beginTime, String endTime) {
		String hql = "from " + Sales.class.getName() + " as model where model.datadate > ? and model.datadate < ?";
		return  (List<Sales>)getSession().createQuery(hql).setParameter(0, beginTime).setParameter(1, endTime).list();
	}

}
